﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.MatchSubstitutionInstructions"
    Title=" " Theme="SkinFile" Codebehind="MatchSubstitutionInstructions.aspx.cs" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="MatchTitleLabel" runat="server" CssClass="PageNameContentStyle"></asp:Label>
    <asp:Label ID="InstructionsTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_InstructionsTitleLabel  %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <style type="text/css">
        .TabsStyle .ajax__tab_header
        {
            border-bottom: solid 2px Silver;
        }
        .TabsStyle .ajax__tab_outer
        {
        }
        .TabsStyle .ajax__tab_inner
        {
        }
        .TabsStyle .ajax__tab_tab
        {
            background-image: url(Images/Wall_tab_regular.jpg);
            background-repeat: no-repeat;
            background-position: bottom;
        }
        .TabsStyle .ajax__tab_hover .ajax__tab_outer
        {
        }
        .TabsStyle .ajax__tab_hover .ajax__tab_inner
        {
        }
        .TabsStyle .ajax__tab_hover .ajax__tab_tab
        {
            background-image: url(Images/Wall_tab_over.jpg);
            background-repeat: no-repeat;
            background-position: bottom;
        }
        .TabsStyle .ajax__tab_active .ajax__tab_outer
        {
        }
        .TabsStyle .ajax__tab_active .ajax__tab_inner
        {
        }
        .TabsStyle .ajax__tab_active .ajax__tab_tab
        {
            background-image: url(Images/Wall_tab_over.jpg);
            background-repeat: no-repeat;
            background-position: bottom;
        }
        .TabsStyle .ajax__tab_header
        {
            font-family: Arial;
            font-size: 14px;
            font-weight: bold;
        }
        .TabsStyle .ajax__tab_outer
        {
            height: 28px;
        }
        .TabsStyle .ajax__tab_inner
        {
        }
        .TabsStyle .ajax__tab_tab
        {
            width: 149px;
            height: 28px;
            margin: 0;
        }
        .TabsStyle .ajax__tab_body
        {
        }
    </style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <asp:HiddenField ID="MatchIdHiddenField" runat="server" />
    <asp:HiddenField ID="LanguageHiddenField" runat="server" />
    <asp:Panel ID="MessagePanel" runat="server" Visible="false">
        <asp:Label ID="Message" runat="server" Text="" SkinID="ConfirmLabel"></asp:Label>
        <br />
    </asp:Panel>
    <asp:TabContainer ID="SubsTabContainer" runat="server" CssClass="TabsStyle">
        <asp:TabPanel runat="server" ID="PlayersSubs">
            <HeaderTemplate>
                <div style="padding-top: 8px;">
                    <asp:Label ID="PlayersSubsHeaderLabel" runat="server" SkinID="TeamNameLabel" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_SubstitutionsButton %>"></asp:Label>
                </div>
            </HeaderTemplate>
            <ContentTemplate>
                <br />
                <asp:Label ID="PlayerSubstitutionsLabel" runat="server" SkinID="InfoLabel" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerSubstitutionsLabel  %>"></asp:Label>
                <br />
                <asp:GridView ID="ExistingSubstitutionsGridView" runat="server" DataSourceID="ShowExistingSubstitutionInstructionsPreMatchSqlDataSource"
                    SkinID="BigProfessional" OnRowCommand="DeleteSubstitutionInstruction" OnRowCreated="ExistingSubstitutionsGridView_OnRowCreated"
                    AutoGenerateColumns="False" AllowPaging="false" EnableTheming="True">
                    <Columns>
                        <asp:BoundField DataField="InstructionId" Visible="true" />
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:Label ID="PlayerOutNameTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerOut  %>"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:HyperLink ID="PlayerOutNameHyperLink" runat="server" Text='<%# Eval("PlayerOutName") %>'
                                    NavigateUrl='<%# Eval("PlayerOutId", "Player.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:Label ID="PlayerInNameTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerIn  %>"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:HyperLink ID="PlayerInNameHyperLink" runat="server" Text='<%# Eval("PlayerInName") %>'
                                    NavigateUrl='<%# Eval("PlayerInId", "Player.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_NotBeforeHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NotBeforeLabel" runat="server" Text='<%# Eval("NotBefore")%>' SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_GoalsCondition  %>">
                            <ItemTemplate>
                                <asp:Label ID="GoalsConditionLabel" runat="server" Text='<%# Eval("GoalsCondition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_PossessionConditionHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="PossessionConditionLabel" runat="server" Text='<%# Eval("PossessionCondition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_NewInstruction  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewPlayerInstructionLabel" runat="server" Text='<%# Eval("NewPlayerInstruction")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_NewPosition  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewPlayerPositionLabel" runat="server" Text='<%# Eval("NewPlayerPosition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_PreferredActionHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewPlayerPreferredActionLabel" runat="server" Text='<%# Eval("NewPlayerPreferredAction")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="DeleteImageButton" runat="server" ImageUrl="~/Images/Icons/delete.png"
                                    OnClientClick='<%# FriendlyChallangeButtonOnClientClick() %>' CommandArgument="<%#((GridViewRow) Container).RowIndex %>"
                                    CommandName="DeleteSubstitutionInstruction" ToolTip="<%$ Resources:Resource, Global_Delete  %>" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                    </EmptyDataTemplate>
                </asp:GridView>
                <asp:SqlDataSource ID="ShowExistingSubstitutionInstructionsPreMatchSqlDataSource"
                    runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Nivdal_ShowExistingSubstitutionInstructionsPreMatch"
                    SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                <br />
                <asp:Label ID="addNewSubstitutionLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_addNewSubstitutionLabel  %>"
                    SkinID="InfoLabel"></asp:Label>
                <br />
                <table style="width: 100%; border-width: thin; border-color: Black; border-style: ridge;"
                    cellpadding="5" cellspacing="2">
                    <tr>
                        <td style="width: 50%;">
                            <asp:Label ID="PlayerOutLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerOut  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerOutDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetPlayersDDLSqlDataSource" DataTextField="PlayerName" DataValueField="PlayerId">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="PlayerOutRequiredFieldValidator" runat="server" ControlToValidate="PlayerOutDropDownList"
                                ErrorMessage="*" Height="16px" InitialValue="0" ValidationGroup="AddPlayerSubstitutions"
                                Style="margin-right: 0px" Width="16px"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            <asp:Label ID="PlayerInLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerIn  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerInDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetPlayersDDLSqlDataSource" DataTextField="PlayerName" DataValueField="PlayerId">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="PlayerInRequiredFieldValidator" runat="server" ControlToValidate="PlayerInDropDownList"
                                ErrorMessage="*" Height="16px" InitialValue="0" ValidationGroup="AddPlayerSubstitutions"
                                Style="margin-right: 0px" Width="16px"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="GoalsConditionLabel" runat="server" Text='<%# Resources.Resource.Global_GoalsCondition+ ":"%>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="GoalsConditionDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetGoalsConditionSqlDataSource" DataTextField="Condition" DataValueField="ConditionId">
                            </asp:DropDownList>
                            <asp:DropDownList ID="GoalsDropDownList" runat="server">
                                <asp:ListItem Selected="True" Value="0">0</asp:ListItem>
                                <asp:ListItem>1</asp:ListItem>
                                <asp:ListItem>2</asp:ListItem>
                                <asp:ListItem>3</asp:ListItem>
                                <asp:ListItem>4</asp:ListItem>
                                <asp:ListItem>5</asp:ListItem>
                                <asp:ListItem>6</asp:ListItem>
                                <asp:ListItem>7</asp:ListItem>
                                <asp:ListItem>8</asp:ListItem>
                                <asp:ListItem>9</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="GoalsLabel" runat="server" Text="<%$ Resources:Resource, Global_Goals  %>"
                                SkinID="InfoLabel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="PossessionOptionLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PossessionOptionLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PossessionOptionDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetPossessionSqlDataSource" DataTextField="PossessionOption" DataValueField="PossessionOptionId">
                            </asp:DropDownList>
                            <asp:TextBox ID="PossessionTextBox" MaxLength="3" runat="server" Width="40px"></asp:TextBox>
                            <asp:Label ID="PercentTitleLabel1" runat="server" Text="%" SkinID="InfoLabel"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="PossessionTextBox"
                                ErrorMessage="*" ValidationExpression="^[0-9]{0,3}$" ValidationGroup="AddPlayerSubstitutions"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="NotBeforeLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_NotBeforeLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:TextBox ID="NotBeforeTextBox" runat="server" MaxLength="3" Width="20px"></asp:TextBox>
                            <asp:Label ID="MinuteLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_MinuteLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="NotBeforeTextBox"
                                ErrorMessage="*" ValidationExpression="^[0-9]{0,3}$" ValidationGroup="AddPlayerSubstitutions"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="NewPositionLabel" runat="server" Text='<%# Resources.Resource.Global_NewPosition+ ":"%>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PositionDropDownList" AppendDataBoundItems="true" DataSourceID="GetPositionsDDLSqlDataSource"
                                DataTextField="PositionName" DataValueField="PositionId" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="NewInstructionLabel" runat="server" Text='<%# Resources.Resource.Global_NewInstruction+ ":"%>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="InstructionDropDownList" AppendDataBoundItems="true" DataSourceID="GetInstructionDDLSqlDataSource"
                                DataTextField="InstructionName" DataValueField="InstructionId" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="NewPreferredActionLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_NewPreferredActionLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PreferredActionDropDownList" AppendDataBoundItems="true" DataSourceID="PreferredActionDDLSqlDataSource"
                                DataTextField="ActionName" DataValueField="ActionId" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Button ID="AddPlayerSubstitutions" runat="server" ValidationGroup="AddPlayerSubstitutions"
                                Text="<%$ Resources:Resource, Global_Add  %>"
                                OnClick="AddPlayerSubstitutions_Click" CssClass="GreenButtonTextStyle"  />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel runat="server" ID="PlayerBehaviourChanges">
            <HeaderTemplate>
                <div style="padding-top: 8px;">
                    <asp:Label ID="PlayerChangesLabel" runat="server" SkinID="TeamNameLabel" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerChangesButton  %>"></asp:Label>
                </div>
            </HeaderTemplate>
            <ContentTemplate>
                <br />
                <asp:Label ID="PlayerBehavioralChangesLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerBehavioralChangesLabel  %>"
                    SkinID="InfoLabel"></asp:Label>
                <br />
                <asp:GridView ID="ExistingPlayerBehaviorChangesInstructionsPreMatchGridView" runat="server"
                    DataSourceID="ShowExistingPlayerBehaviorChangesInstructionsPreMatchSqlDataSource"
                    SkinID="BigProfessional" OnRowCommand="DeleteBehaviorInstruction" AutoGenerateColumns="False"
                    AllowPaging="false" EnableTheming="True">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:Label ID="PlayerNameTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Player  %>"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:HyperLink ID="PlayerNameHyperLink" runat="server" Text='<%# Eval("PlayerName") %>'
                                    NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_NotBeforeHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NotBeforeLabel" runat="server" Text='<%# Eval("NotBefore")%>' SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_GoalsCondition  %>">
                            <ItemTemplate>
                                <asp:Label ID="GoalsConditionLabel" runat="server" Text='<%# Eval("GoalsCondition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_PossessionConditionHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="PossessionConditionLabel" runat="server" Text='<%# Eval("PossessionCondition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_NewInstruction %>">
                            <ItemTemplate>
                                <asp:Label ID="NewPlayerInstructionLabel" runat="server" Text='<%# Eval("NewPlayerInstruction")%>'
                                    SkinID="GridLabel"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_NewPosition  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewPlayerPositionLabel" runat="server" Text='<%# Eval("NewPlayerPosition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_PreferredActionHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewPlayerPreferredActionLabel" runat="server" Text='<%# Eval("NewPlayerPreferredAction")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="DeleteImageButton" runat="server" ImageUrl="~/Images/Icons/delete.png"
                                    OnClientClick='<%# FriendlyChallangeButtonOnClientClick() %>' CommandArgument='<%# Eval("InstructionId") %>'
                                    CommandName="DeleteBehaviorInstruction" ToolTip="<%$ Resources:Resource, Global_Delete  %>" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                    </EmptyDataTemplate>
                </asp:GridView>
                <asp:SqlDataSource ID="ShowExistingPlayerBehaviorChangesInstructionsPreMatchSqlDataSource"
                    runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Nivdal_ShowExistingPlayerBehaviorChangesInstructionsPreMatch"
                    SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                <br />
                <asp:Label ID="PlayerBehaviourTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerBehaviourTitleLabel  %>"
                    SkinID="InfoLabel"></asp:Label>
                <br />
                <table style="width: 100%; border-width: thin; border-color: Black; border-style: ridge;"
                    cellpadding="5" cellspacing="2">
                    <tr>
                        <td>
                            <asp:Label ID="PlayerBehaviourLabel" runat="server" Text="<%$ Resources:Resource, Global_Player  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerBehaviourDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetPlayersDDLSqlDataSource" DataTextField="PlayerName" DataValueField="PlayerId">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="PlayerBehaviourRequiredFieldValidator" runat="server"
                                ControlToValidate="PlayerBehaviourDropDownList" ErrorMessage="*" Height="16px"
                                InitialValue="0" ValidationGroup="AddPlayerBehaviour" Style="margin-right: 0px"
                                Width="16px"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PlayerGoalsConditionBehaviourLabel" runat="server" Text='<%# Resources.Resource.Global_GoalsCondition+ ":"%>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerGoalsConditionBehaviourDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetGoalsConditionSqlDataSource" DataTextField="Condition" DataValueField="ConditionId">
                            </asp:DropDownList>
                            <asp:DropDownList ID="PlayerGoalsBehaviourDropDownList" runat="server">
                                <asp:ListItem Selected="True" Value="0">0</asp:ListItem>
                                <asp:ListItem>1</asp:ListItem>
                                <asp:ListItem>2</asp:ListItem>
                                <asp:ListItem>3</asp:ListItem>
                                <asp:ListItem>4</asp:ListItem>
                                <asp:ListItem>5</asp:ListItem>
                                <asp:ListItem>6</asp:ListItem>
                                <asp:ListItem>7</asp:ListItem>
                                <asp:ListItem>8</asp:ListItem>
                                <asp:ListItem>9</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="PlayerGoalsBehaviourLabel" runat="server" Text="<%$ Resources:Resource, Global_Goals %>"
                                SkinID="InfoLabel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PlayerPossessionOptionBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerPossessionOptionBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerPossessionOptionBehaviourDropDownList" runat="server"
                                AppendDataBoundItems="true" DataSourceID="GetPossessionSqlDataSource" DataTextField="PossessionOption"
                                DataValueField="PossessionOptionId">
                            </asp:DropDownList>
                            <asp:TextBox ID="PlayerPossessionBehaviourTextBox" MaxLength="3" runat="server" Width="40px"></asp:TextBox>
                            <asp:Label ID="PlayerPossessionBehaviourLabel" runat="server" Text="%" SkinID="InfoLabel"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="PlayerPossessionBehaviourTextBox"
                                ErrorMessage="*" ValidationExpression="^[0-9]{0,3}$" ValidationGroup="AddPlayerBehaviour"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PlayerNotBeforBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerNotBeforBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:TextBox ID="PlayerNotBeforeBehaviourTextBox" runat="server" MaxLength="3" Width="20px"></asp:TextBox>
                            <asp:Label ID="MinuteLabel1" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_MinuteLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="PlayerNotBeforeBehaviourTextBox"
                                ErrorMessage="Only 1-3 digits" ValidationExpression="^[0-9]{0,3}$" ValidationGroup="AddPlayerBehaviour"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PlayerNewPositionBehaviourLabel" runat="server" Text='<%$ Resources:Resource, Global_NewPosition %>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerPositionBehaviourDropDownList" AppendDataBoundItems="true"
                                DataSourceID="GetPositionsDDLSqlDataSource" DataTextField="PositionName" DataValueField="PositionId"
                                runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PlayerNewInstructionBehaviourLabel" runat="server" Text='<%$ Resources:Resource, Global_NewInstruction %>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerNewInstructionBehaviourDropDownList" AppendDataBoundItems="true"
                                DataSourceID="GetInstructionDDLSqlDataSource" DataTextField="InstructionName"
                                DataValueField="InstructionId" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PlayerNewPreferredActionBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerNewPreferredActionBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="PlayerPreferredActionBehaviourDropDownList" AppendDataBoundItems="true"
                                DataSourceID="PreferredActionDDLSqlDataSource" DataTextField="ActionName" DataValueField="ActionId"
                                runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="AddPlayerBehaviour" runat="server" ValidationGroup="AddPlayerBehaviour"
                                CssClass="GreenButtonTextStyle" Text="<%$ Resources:Resource, Global_Add  %>"
                                OnClick="AddPlayerBehaviour_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TeamPanel" runat="server">
            <HeaderTemplate>
                <div style="padding-top: 8px;">
                    <asp:Label ID="Label1" runat="server" SkinID="TeamNameLabel" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamChangesButton %>"></asp:Label>
                </div>
            </HeaderTemplate>
            <ContentTemplate>
                <br />
                <asp:Label ID="TeamBehavioralChangesLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamBehavioralChangesLabel  %>"
                    SkinID="InfoLabel"></asp:Label>
                <br />
                <asp:GridView ID="ExistingTeamBehavioralChangesGridView" runat="server"
                    DataSourceID="ShowExistingTeamBehaviorChangesInstructionsPreMatchSqlDataSource"
                    SkinID="BigProfessional" OnRowCommand="DeleteBehaviorInstruction" AutoGenerateColumns="False"
                    AllowPaging="True" EnableTheming="True">
                    <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
            <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
                    <Columns>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_NotBeforeHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NotBeforeLabel" runat="server" Text='<%# Eval("NotBefore")%>' SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_GoalsCondition  %>">
                            <ItemTemplate>
                                <asp:Label ID="GoalsConditionLabel" runat="server" Text='<%# Eval("GoalsCondition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_PossessionConditionHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="PossessionConditionLabel" runat="server" Text='<%# Eval("PossessionCondition")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_NewTeamAttitudeHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewTeamAttitudeLabel" runat="server" Text='<%# Eval("NewTeamAttitude")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$ Resources:Resource, MatchSubstitutionInstructions_NewTeamAggressivenessHeaderText  %>">
                            <ItemTemplate>
                                <asp:Label ID="NewTeamAggressivenessLabel" runat="server" Text='<%# Eval("NewTeamAggressiveness")%>'
                                    SkinID="GridLabel"> </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="DeleteImageButton" runat="server" ImageUrl="~/Images/Icons/delete.png"
                                    OnClientClick='<%# FriendlyChallangeButtonOnClientClick() %>' CommandArgument='<%# Eval("InstructionId") %>'
                                    CommandName="DeleteTeamBehaviorInstruction" ToolTip="<%$ Resources:Resource, Global_Delete  %>" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                    </EmptyDataTemplate>
                </asp:GridView>
                <asp:SqlDataSource ID="ShowExistingTeamBehaviorChangesInstructionsPreMatchSqlDataSource"
                    runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Nivdal_ShowExistingTeamBehaviorChangesInstructionsPreMatch"
                    SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                <br />
                <asp:Label ID="TeamBehaviourTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamBehaviourTitleLabel  %>"
                    SkinID="InfoLabel"></asp:Label>
                <br />
                <table style="width: 100%; border-width: thin; border-color: Black; border-style: ridge;"
                    cellpadding="5" cellspacing="2">
                    <tr>
                        <td>
                            <asp:Label ID="TeamGoalsConditionBehaviourLabel" runat="server" Text='<%# Resources.Resource.Global_GoalsCondition+ ":"%>'
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="TeamGoalsConditionBehaviourDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetGoalsConditionSqlDataSource" DataTextField="Condition" DataValueField="ConditionId">
                            </asp:DropDownList>
                            <asp:DropDownList ID="TeamGoalsBehaviourDropDownList" runat="server">
                                <asp:ListItem Selected="True" Value="0">0</asp:ListItem>
                                <asp:ListItem>1</asp:ListItem>
                                <asp:ListItem>2</asp:ListItem>
                                <asp:ListItem>3</asp:ListItem>
                                <asp:ListItem>4</asp:ListItem>
                                <asp:ListItem>5</asp:ListItem>
                                <asp:ListItem>6</asp:ListItem>
                                <asp:ListItem>7</asp:ListItem>
                                <asp:ListItem>8</asp:ListItem>
                                <asp:ListItem>9</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="TeamGoalsBehaviourLabel" runat="server" Text="<%$ Resources:Resource, Global_Goals %>"
                                SkinID="InfoLabel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="TeamPossessionOptionBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamPossessionOptionBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="TeamPossessionOptionBehaviourDropDownList" runat="server" AppendDataBoundItems="true"
                                DataSourceID="GetPossessionSqlDataSource" DataTextField="PossessionOption" DataValueField="PossessionOptionId">
                            </asp:DropDownList>
                            <asp:TextBox ID="TeamPossessionBehaviourTextBox" MaxLength="3" runat="server" Width="40px"></asp:TextBox>
                            <asp:Label ID="TeamPossessionBehaviourLabel" runat="server" Text="%" SkinID="InfoLabel"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="TeamPossessionBehaviourTextBox"
                                ErrorMessage="*" ValidationExpression="^[0-9]{0,3}$" ValidationGroup="AddTeamBehaviour"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="TeamNotBeforBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamNotBeforBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:TextBox ID="TeamNotBeforeBehaviourTextBox" runat="server" MaxLength="3" Width="20px"></asp:TextBox>
                            <asp:Label ID="MinuteLabel2" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_MinuteLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="TeamNotBeforeBehaviourTextBox"
                                ErrorMessage="*" ValidationExpression="^[0-9]{0,3}$" ValidationGroup="AddTeamBehaviour"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="TeamNewAttituseBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamNewAttituseBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="TeamNewAttitudeBehaviourDropDownList" AppendDataBoundItems="true"
                                DataSourceID="GetAttitudeDDLSqlDataSource" DataTextField="AttitudeName" DataValueField="AttitudeId"
                                runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="TeamNewAggressivenessBehaviourLabel" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamNewAggressivenessBehaviourLabel  %>"
                                SkinID="InfoLabel"></asp:Label>
                            <asp:DropDownList ID="TeamAggressivenessBehaviourDropDownList" AppendDataBoundItems="true"
                                DataSourceID="GetAggressivenessDDLSqlDataSource" DataTextField="AggressivenessName"
                                DataValueField="AggressivenessId" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="AddTeamBehaviour" runat="server" ValidationGroup="AddTeamBehaviour"
                                Text="<%$ Resources:Resource, Global_Add  %>"
                                OnClick="AddTeamBehaviour_Click" CssClass="GreenButtonTextStyle" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
    <%--    <asp:LinkButton ID="PlayerSubstitutionsButton" runat="server" OnClick="PlayerSubstitutionsButtonClick" SkinID="GreenTitleLink"
    Text="Substitutions" ></asp:LinkButton>
    &nbsp;&nbsp;&nbsp;
    <asp:LinkButton ID="PlayerChangesButton" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_PlayerChangesButton  %>" 
    OnClick="PlayerInstructionsButtonClick" SkinID="GreenTitleLink"></asp:LinkButton>
     &nbsp;&nbsp;&nbsp;
    <asp:LinkButton ID="TeamChangesButton" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_TeamChangesButton  %>" 
    OnClick="TeamInstructionsButtonClick" SkinID="GreenTitleLink"></asp:LinkButton>
    <br /><br />--%>
    <%--    <asp:Panel ID="PlayerSubstitutionsPanel" runat="server">
    
                   
    </asp:Panel>--%>
    <%--    <asp:Panel ID="PlayerBehaviourChangePanel" runat="server">
    
        
    </asp:Panel>--%>
    <%--    <asp:Panel ID="TeamBehaviourChangePanel" runat="server">
    

    </asp:Panel>--%>
    <br />
    <br />
    <asp:HyperLink ID="BackToTheInitialInstructionsNameHyperLink" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_BackToTheInitialInstructionsNameHyperLink  %>"
        SkinID="GreenTitleHyperLink"></asp:HyperLink>
    <br />
    <br />
    <asp:Button ID="DeleteAllExistingInstructionsButton" runat="server" CssClass="GreyButtonTextStyle"
        Text="<%$ Resources:Resource, Global_DeleteAll  %>"
        OnClick="DeleteAllExistingInstructionsButton_Click" />
    &nbsp;&nbsp;&nbsp;
    <asp:Button ID="DoneButton" runat="server" Text="<%$ Resources:Resource, MatchSubstitutionInstructions_DoneButton  %>"
        OnClick="DoneButton_Click" CssClass="GreenButtonTextStyle" />
    <asp:SqlDataSource ID="GetPlayersDDLSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetPlayersDDL" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <asp:SqlDataSource ID="GetGoalsConditionSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetGoalsConditionDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GetPossessionSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetPossessionOptionDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GetPositionsDDLSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetStartingPositionsDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GetInstructionDDLSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetInstructionDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GetAttitudeDDLSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetAttitudeDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GetAggressivenessDDLSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetAggressivenessDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="PreferredActionDDLSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetPreferredActionsDDL" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="LanguageHiddenField" PropertyName="Value" Name="Language"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
    </div>
</asp:Content>
